import 'package:flutter/material.dart';

// 编辑帖子模块的删除图片图标
class CloseCircle extends StatelessWidget {
  final int index;
  final ValueChanged<int> callback;

  CloseCircle({Key key, @required this.index, @required this.callback}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        width: 20,
        height: 20,
        decoration: new BoxDecoration(
            border: new Border.all(width: 0.5, color: Colors.grey),
            color: Colors.grey,
            borderRadius: new BorderRadius.circular((10.0))),
        child: Icon(Icons.close, color: Colors.white, size: 10),
      ),
      onTap: (){
        callback(index);
      },
    );
  }
}
